package com.bckj.fastboot.upms.api.service;

import com.bckj.fastboot.core.lang.model.PageResult;
import com.bckj.fastboot.upms.api.constant.UpmsConstant;
import com.bckj.fastboot.upms.api.dto.ClientAuthInfo;
import org.springframework.cloud.openfeign.FeignClient;

import org.springframework.web.bind.annotation.*;

import com.bckj.fastboot.upms.api.vo.SysOauthClientDetailsVO;
import com.bckj.fastboot.upms.api.dto.SysOauthClientDetailsRequest;
import com.bckj.fastboot.upms.api.dto.SysOauthClientDetailsQuery;

import java.util.List;

/**
 * 客户端信息表(SysOauthClientDetails)remote
 *
 * @author wfc
 * @since 2023-09-11 17:38:25
 */
@FeignClient(value = UpmsConstant.SERVICE_ID, contextId = "sysOauthClientDetails", path = "/client")
public interface SysOauthClientDetailsRemoteService {

    /**
	 * 列表(分页)
	 *
	 * @param query req
	 * @return boolean
	 */
	@GetMapping("page")
	PageResult<SysOauthClientDetailsVO> page(SysOauthClientDetailsQuery query);
	
    /**
	 * 列表
	 *
	 * @param query req
	 */
	@GetMapping("list")
	List<SysOauthClientDetailsVO> list(SysOauthClientDetailsQuery query);
	
    /**
	 * 增加
	 *
	 * @param request req
	 * @return boolean
	 */
	@PostMapping()
	boolean save(@RequestBody SysOauthClientDetailsRequest request);

	/**
	 * 修改
	 *
	 * @param request req
	 * @return boolean
	 */
	@PutMapping()
	boolean update(@RequestBody SysOauthClientDetailsRequest request);

	/**
	 * 移除
	 *
	 * @param id id
	 * @return boolean
	 */
	@DeleteMapping("{id}")
	boolean remove(@PathVariable Long id);

	/**
	 * 详情
	 *
	 * @param id id
	 * @return vo
	 */
	@GetMapping("{id}")
	SysOauthClientDetailsVO details(@PathVariable Long id);

	/**
	 * 根据客户端id查询
	 * @param clientId 客户端id
	 * @return entity
	 */
	@GetMapping("findByClientId")
	ClientAuthInfo findByClientId(@RequestParam("clientId") String clientId);
}
